
/**
 * 代表一个知识点.
 */
export class DiaryUnitModel {
    /**
     * 日记单元id.
     */
    public id: number | null = null;
    /**
     * 主题.
     * 日记单元的主题,不超过255个字符.
     */
    public subject: string | null = null;
    /**
     * 具体内容.
     * 客观内容.
     */
    public content: string | null = null;
    /**
     * 附加内容.
     * 感想,自己的心理.
     */
    public extra: string | null = null;
    /**
     * 属于的diary的id.
     */
    public diaryId: number | null = null;
    //用户id.
    public userId: number | null = null;
    /**
     * review次数.
     * 每次记录的东西,需要review的.
     */
    public reviewCount: number = 0;

    /**
     *
     */
    public categoryId: number | null = null;

    static testModel(userId: number):DiaryUnitModel {
        let model = new DiaryUnitModel();
        model.subject = "01-my_software_hierachy";
        model.content = "this is a very hard thing";
        model.diaryId = 1;
        model.categoryId = 1;
        model.extra = "{}";
        model.userId = userId;
        return model;
    }
}
